<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/sql" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/4/8
  Time: 19:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改</title>
</head>
<body>
<%@ include file="isLogin.jsp"%>


    <%
        request.setCharacterEncoding("utf8");

        String id = request.getParameter("id");
        String username = request.getParameter("username");
        String password = request.getParameter("password");
    %>


<sql:setDataSource var="datasource" driver="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://localhost:3306/sctu_javaweb_2018?serverTimezone=UTC"
                   user="root"
                   password="123456"
                   scope="request"/>
<sql:update var="insert" dataSource="${datasource}">
    update t_users set username = '"+username+"',password = '"+password+"' where id = " + id + "
    <sql:param value="100"/>
    <sql:param>jstl</sql:param>
</sql:update>



更新成功！！！
    <%--<%@ include file="footer.jsp" %>--%>
<jsp:include page="footer.jsp">
    <jsp:param name="year" value="2016" />
</jsp:include>

</body>
</html>
